﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using Sim;
using Lists;
using System.Threading.Tasks;
using System.Threading;
using ClientApplication;

namespace WindowsFormsApplication1
{
    static public class Program
    {
        static public UserList ul = new UserList();
        static public TournamentList tl = new TournamentList();
        static public ClientApplications ca = new ClientApplications();
        static public bool isLoggedIn = false;
        public struct tournamentInfo
        {
            public string title;
            public string date;
            public string gender;
        }
        static public List<tournamentInfo> ti = new List<tournamentInfo>();

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            
            Main main = new Main();
            Login login = new Login();
            PresenterMain presenter = new PresenterMain(main, login, ul, tl);

            
            Thread ta = new Thread(ca.Receive);
            ta.Start();

            Application.Run(main);

        }
    }
}
